<script setup lang="ts">
defineProps<{
  modelValue: number
  msg: string
}>()
const emit = defineEmits<{
  (e: 'update:modelValue', num: number): void
  (e: 'update:msg', str: string): void
}>()
</script>

<template>
  <div>
    单选子组件 {{ modelValue }}
    <button @click="emit('update:modelValue', modelValue + 6)">count++</button>
  </div>
  <div>
    子组件的第二个双向绑定数据 {{ msg }}
    <button @click="emit('update:msg', 'hello world')">换英文</button>
  </div>
</template>